package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: liangyuanzhang
 * Date: 2025-3-25
 * Time: 21:52
 */
public class Test {
    public static void main(String[] args) {
        MySingleList list = new MySingleList();
        list.addFirst(0);
        list.addFirst(0);
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        System.out.println("头插");
        list.display();

        list.addLast(4);
        list.addLast(5);
        list.addLast(6);
        System.out.println("尾插");
        list.display();

        System.out.println("任意位置插入");
        list.addIndex(7,7);
        list.display();

        boolean ret = list.contains(6);
        System.out.println(ret);

        list.remove(7);
        list.display();

        list.removeAllKey(0);
        list.display();

        int len = list.size();
        System.out.println(len);
    }
}
